package edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseController;

import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseDao.NitrogenDAO;
import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseEntity.NitrogenData;
import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseService.NitrogenDataService;
import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = "土壤数据-氮含量数据管理")
@RestController
@RequestMapping("/nitrogen")
public class NitrogenDataController extends LogicController<NitrogenDataService, NitrogenDAO, NitrogenData, Long> {


    public NitrogenDataController(NitrogenDataService service) {
        super(service);
    }

    // 可以添加其他自定义 API 接口
    @GetMapping("/get")

    @ApiOperation(value = "通过ID获取土壤检测数据", notes = "根据土壤检测数据ID获取土壤检测数据")

    public NitrogenData GET(@RequestParam Long id) {

        return service.GET(id);

    }
}

